package com.edisoncgh.service.impl;

import com.edisoncgh.mapper.CommentInfoMapper;
import com.edisoncgh.pojo.CommentInfo;
import com.edisoncgh.service.CommentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentsServiceImpl implements CommentsService {
    @Autowired
    private CommentInfoMapper commentInfoMapper;

    @Override
    public boolean insertComment(CommentInfo commentInfo) {
        return commentInfoMapper.insert(commentInfo) > 0;
    }

    @Override
    public List<CommentInfo> findByArtId(Integer art_id) {
        return commentInfoMapper.findByArtId(art_id);
    }
}
